﻿using Lamex.Base.Framework.BaseAbs;
using Lamex.SystemManager.Bridge;
using Lamex.SystemManager.Interfaces;
using Lamex.SystemManager.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Lamex.SystemManager.BLL
{
    public class tb_OrgStucture : BaseBLL<tb_OrgStuctureInfo>
    {
        public Itb_OrgStucture dal = null;
        public tb_OrgStucture()
	   {
           base.Init(this.GetType().FullName, System.Reflection.Assembly.GetExecutingAssembly().GetName().Name);
           //if (BridgeFactory.BridgeType == BridgeType.ADODirect)
               dal = new ADODirect_tb_OrgStucture().GetInstance();


           //if (BridgeFactory.BridgeType == BridgeType.ADODirect)
           //    dal = new UserChannel();
               
       }

       public List<tb_OrgStuctureInfo> GetAllOUsByParent(int parentId)
        {
           return dal.GetAllOUsByParent(parentId);
        }

        public List<OUNodeInfo> GetTreeByID(int mainOUID)
       {
           return dal.GetTreeByID(mainOUID);
       }

        public List<tb_OrgStuctureInfo> GetCompany()
        {
            return dal.GetCompany();
        }

        public List<tb_OrgStuctureInfo> GetAllCompany()
        {
            return dal.GetAllCompany();
        }

    }

}
